/*
 * Ext GWT 2.2.4 - Ext for GWT
 * Copyright(c) 2007-2010, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
package id.co.rho.scoring.cid.client.mvc;

import com.extjs.gxt.ui.client.Registry;
import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;
import com.extjs.gxt.ui.client.mvc.View;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.inject.Inject;

public class ContentView extends View {

    private TabPanel tabPanel;
    private ContentPanel contentPanel;

    @Inject
    public ContentView(Controller controller) {
        super(controller);
    }

    public void initialize() {
        contentPanel = (ContentPanel) Registry.get(AppView.CENTER_PANEL);
        contentPanel.layout();
    }

    protected void handleEvent(AppEvent event) {
        contentPanel.removeAll();
        TextField widget = new TextField();
        contentPanel.add(widget);
        contentPanel.layout();
    }

}
